<template>
  <div class="input-group input-group-lg">
    <input
      type="text"
      class="form-control border border-info"
      placeholder="Recipient's"
      v-model="text"
    />
    <div class="input-group-append" @click="but">
      <span
        class="input-group-text bg-info border border-info"
        id="basic-addon2"
      >
        创建
      </span>
    </div>
  </div>
</template>

<script>
export default {
  name: "CreateTodoComponent",
  data() {
    return {
      text: ""
    };
  },
  methods: {
    but() {
      // console.log(this.text)
      this.$emit("emit-text", this.text);
      this.text = "";
    }
  }
};
</script>

<style scoped></style>
